The present invention relates to a method and equipment for synchronizing network elements over a packet-switched network.
A telecommunications network is a network where network elements, especially switches and base stations, need to work coherently. Oscillators in these devices are generally not accurate enough over longer time intervals and need to be adjusted in order to keep them synchronized. Timing errors are due to variations in network delay and latencies in computer hard-ware and software as well as clock oscillator instability.
Time stamps may be used to deliver timing information for synchronization between network elements. Time stamps typically describe the time they were created according to a clock of a transmitter network ele-ment sending the time stamps. A receiving network element then tries to achieve the same timing as the transmitter by adjusting its local clock based on the received time stamps. In a packet-switched network the transmission delays may vary very much and the time stamps may be delayed with a large variation in the delay.
Networks based on the IP protocol are not typically clocked since they operate asynchronously, and transmission times are highly variable and unpredictable. Network Time Protocol (NTP) is a protocol used to syn-chronize clocks over a packet-switched network, especially over IP networks.
The scope of NTP is to synchronize the absolute time values and the frequencies of the clocks involved. NTP is widely used in the Internet to synchronize computer clocks to national standard time.
One problem with the prior art solutions is that they do not work very well with wide variations in delay typical of packet-switched net-works. In many cases it is enough to adjust the frequency of a system clock, which makes NTP unnecessarily complex for this purpose.
The object of the invention is to enhance frequency syn-chronization in networks with variable delays. The object of the invention is achieved with a method, an apparatus and a telecommunications system which are characterized by what is disclosed in the independent claims. The preferred embodiments of the invention are set forth in the dependent claims.
The invention is based on adjusting frequency generation based on estimating the frequency of a receiver oscillator to be synchronized using only part of the received time stamps. Time stamps are transferred from a transmitter network element (meaning any network element providing reference timing information) to a receiver network element (meaning any network element obtaining timing information to achieve frequency synchronization). The expected reception times of time stamps are estimated, preferably taking all time stamps in pre-determined window into account. The deviations from the estimated expected times are calculated for time stamps and at least one time stamp deviating most from the estimated expected time is removed. The estimations, deviation calculations and time stamp removals are repeated taking remaining time stamps into account as many times as necessary until a pre-determined part of the time stamps has been removed. The frequency of the receiver oscillator is then estimated using the remaining time stamps after the pre-determined part of the time stamps is removed. The frequency generation of the receiver oscillator is then adjusted based on the estimated frequency. According to a preferred embodiment of the invention, the expected times for reception of the time stamps and the oscillator frequency are estimated by least-squares method. Also, according to an embodiment of the invention, it is possible to remove the pre-determined number of time stamps and estimate the frequency without using iteration.
One advantage of the invention is that synchronization can be more reliably performed as the frequency of the receiver oscillator can be estimated more accurately especially in networks with greatly variable delays.
A further advantage is that the frequency synchronization according to the invention is easier to implement than the techniques providing time and frequency synchronization. Also, no specific request for transmission of time stamps is needed.